import { getIntl } from 'umi'
import React from 'react'
import * as Icon from '@ant-design/icons'


const language = getIntl()
export function selectLanguage(id: string) {
  return language.formatMessage({id})
} 

export function createIcon (name: string,obj = {style: {fontSize:'18px'}}) {
  return React.createElement(Icon && (Icon as any)[name],{...obj})
}
